#!/usr/bin/env python3
"""
Celery Worker 启动脚本

用法:
1. 从项目根目录运行: python deployment/scripts/celery_worker.py
2. 或者添加路径: PYTHONPATH=. python deployment/scripts/celery_worker.py
"""

import sys
import os
import logging

# 添加项目根目录到Python路径
project_root = os.path.join(os.path.dirname(__file__), '../..')
sys.path.insert(0, os.path.abspath(project_root))

from app.celery_app import celery_app

if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
    print(f"启动Celery Worker，项目根目录: {os.path.abspath(project_root)}")
    celery_app.start()